package com.brillilab.service.module.message.template.impl.method;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: MemberMethodToShareOtherTemp
 * @ProjectName brill_lab
 * @Description: 成员方法被管理员分享给其他成员
 * @date 2019/5/27 18:06
 */
@Data
public class MemberMethodToShareOtherTemp extends AbstractMessageTemplate {

    private String PIName;
    private String shareUserName;
    private String methodName;

    /**
     * 成员方法被管理员分享给其他成员
     * @param labId         实验室ID
     * @param receiverId    接收人ID
     * @param labMemberId   接收者实验室成员Id
     * @param PIName        管理员姓名
     * @param shareUserName 分享者姓名
     * @param methodName    方法名称
     * @param referId       业务关联Id
     */
    public MemberMethodToShareOtherTemp(Long labId, Long receiverId, Long labMemberId, String PIName, String shareUserName, String methodName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.MemberMethodToShareOther.getValue());
        super.setTitle("您收到了管理员分享的方法");
        String content = String.format("<span style='color:#F6AC2D'>%s</span><span>分享了</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span><span>方法给您</span>",
                PIName, shareUserName, methodName);
        super.setContent(content);
        super.setAppContent(String.format("%s分享了%s的%s方法给您",PIName, shareUserName, methodName));
        this.labMemberId = labMemberId;
        this.PIName = PIName;
        this.shareUserName = shareUserName;
        this.methodName = methodName;
        this.referId = referId;
    }

}
